package com.xbongbong.saas.domain.entity;

import com.xbongbong.paas.enums.DelEnum;
import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * @author lee
 * @date  2020-01-10 10:58
 **/
@Getter
@Setter
@ToString
public class StockSurplusRecordEntity implements Serializable{

    private static final long serialVersionUID = 2436013807285057490L;

    /**
     * 主键
     *
     */
    private Long id;
    /**
     * 公司id
     *
     */
    private String corpid;
    /**
     * 仓库id
     *
     */
    private Long warehouseId;
    /**
     *
     * 产品id
     *
     */
    private Long productId;

    /**
     *
     * 结存总库存
     *
     */
    private Double remainingStock;

    /**
     *
     * 结存总成本
     *
     */
    private Double remainingCost;

    /**
     *
     * 流水发生时间
     *
     */
    private Long date;

    /**
     *
     * product_warehouse唯一key
     *
     */
    private String warehouseKey;

    /**
     *
     * 添加时间
     *
     */
    private Long addTime;
    /**
     *
     * 更新时间
     *
     */
    private Long updateTime;
    /**
     *
     * 删除标志
     *
     */
    private Integer del;

    public StockSurplusRecordEntity(String corpid, Long warehouseId, Long refId, Integer stockType, Long productId, String refSheetNo, Long businessId, String businessName, Double num, Double productCost, Double remainingStock, Double remainingCost, Long date, Integer businessType, String warehouseKey) {
        this.corpid = corpid;
        this.warehouseId = warehouseId;
        this.productId = productId;
        this.remainingStock = remainingStock;
        this.remainingCost = remainingCost;
        this.date = date;
        this.warehouseKey = warehouseKey;
        this.del = DelEnum.NORMAL.getDel();
        this.addTime = DateTimeUtil.getInt();
        this.updateTime = DateTimeUtil.getInt();
    }

    public StockSurplusRecordEntity() {
        this.del = DelEnum.NORMAL.getDel();
    }
}
